<script src="mapped_minified.js"></script>
<script>
  function navigate() {
    window.location.href = `doc_navigate.html?navigated=true`;
  }
  function recordingFinished() {
    dump(`RecReplaySendAsyncMessage Example__Finished`);
  }
  const navigated = new URL(window.location.href).searchParams.get("navigated");
  if (!navigated) {
    // Since we don't have an exact time for when the "Rec" button will be pressed,
    // this timeout needs to be decently long so that we don't navigate before
    // we've started recording.
    setTimeout(navigate, 2000);
  } else {
    setTimeout(recordingFinished, 100);
  }
</script>
